import request from '@/utils/request'

// 获取部门列表
export const reqDepartments = () => {
  return request({
    url: '/company/department'
  })
}

// 删除部门
export const reqDelDepartments = (id) => {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}

// 添加部门
export const reqAddDepartments = (data) => {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}
// 编辑部门
export function reqGetDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// 修改部门数据
export const reqPutDepartDetail = (data) => {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
